﻿using Microsoft.AspNet.SignalR;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Data.Entity;

namespace TT.Web.Controllers
{
    public class MatchController : Controller
    {
        private readonly Logic.Interfaces.ITTContext _dbContext;
        private readonly Logic.Interfaces.ITournamentGenerator _tournamentGenerator;

        public MatchController(Logic.Interfaces.ITTContext ttContext,
            Logic.Interfaces.ITournamentGenerator tournamentGenerator) 
        {
            _dbContext = ttContext;
            _tournamentGenerator = tournamentGenerator;
        }

        public ActionResult Index(int id)
        {
            var match = _dbContext.Matches.FirstOrDefault(x => x.Id == id);
            return View(match);
        }
    }
}
